
# coding: utf-8

# In[ ]:


def gcm(a, b):  
    assert a > 0 and b > 0,'parameters must be greater than 0.'  
    if a >= b:  
        if a % b == 0:  
            return b  
        else:  
            return gcm(b, a - b)  
    else:  
        return gcm(b, a)  

def lcm(a, b):  
    assert a > 0 and b > 0,'parameters must be greater than 0.'  
    return a * b / gcm(a, b)  

i = input("input 2 num,use ',' as sep ")
i = i.split(",")
i = [int(s) for s in i]
print("gcm:{},lcm:{}".format(gcm()))

